///**
// * 
// */
//package model;
//
////import static org.junit.Assert.assertEquals;
//
//import static org.junit.Assert.*;
//
//import java.util.List;
//
//import org.junit.Test;
//import controller.Controller;
//import database.Table;
//
///**
// * @author Ken
// *
// */
//
//public class FromTest {
//	
//	@Test
//	public void test5() {
//		Controller c = new Controller();		
//		Model model = new Model();					
//		model.loadDatabase();
////		String query = "SELECT Customer,MIN(OrderPrice) FROM Orders GROUP BY Customer";
////		String query = "select id, day from Class";
//		String query = "select customer, min(orderprice) from orders group by customer";
////		String query = "select  from student st , teacher tc, class c where st.teacherid = tc.id";
//		List<List<String>> ret = (List<List<String>>) model.executeQuery(query, "TestDB");
//		for (int i = 0; i < ret.size(); i++) {
//			List<String> r = ret.get(i);
//			for (int j = 0; j < r.size(); j++) {
//				System.out.print(r.get(j) + "\t");				
//			}
//			System.out.print('\n');
//		}	
//	}
//	
////	@Test
////	public void test4() {
////		Controller c = new Controller();		
////		Model model = new Model();					
////		model.loadDatabase();
////		String query = "SELECT *";
////		SelectQuery sq = new SelectQuery(query);
////		Table t = model.getTable("KHTN", "Student");
////		List<SelectQueryData> sqds = sq.queryParse(t.get_rows(), t.get_fields());
////		for (int i = 0; i < sqds.size(); i++) {
////			SelectQueryData sqd = sqds.get(i);
////			System.out.println(sqd.getColumnNames() + sqd.getSelectQueryType().toString());
////		}
////	}
////		
////	@Test
////	public void test3() {
////		Controller c = new Controller();		
////		Model model = new Model();					
////		model.loadDatabase();
////		String query = "Select * from Student st join Teacher tc on st.id = tc.id order by st.dtb, tc.id desc";
////		List<List<String>> ret = (List<List<String>>) model.executeQuery(query, "KHTN");													
////		for (int i = 0; i < ret.size(); i++) {
////			List<String> r = ret.get(i);
////			for (int j = 0; j < r.size(); j++) {
////				System.out.print(r.get(j) + "\t");				
////			}
////			System.out.print('\n');
////		}	
////	}
////	
////	@Test
////	public void test2() {
////		Controller c = new Controller();		
////		Model model = new Model();					
////		model.loadDatabase();
////		String query = "select * from Student st join Teacher tc on st.id = tc.id";
////		List<List<String>> ret = (List<List<String>>) model.executeQuery(query, "KHTN");													
////		for (int i = 0; i < ret.size(); i++) {
////			List<String> r = ret.get(i);
////			for (int j = 0; j < r.size(); j++) {
////				System.out.print(r.get(j) + "\t");				
////			}
////			System.out.print('\n');
////		}	
////	}
////		 
////	@Test
////	public void test1(){									
////		Controller c = new Controller();		
////		Model model = new Model();					
////		model.loadDatabase();
////		
////		String query = new String("Select Student.Id, Student.Full Name, student.dtb, teacher.id from Student, Teacher, Class where (Student.ID = Teacher.id)OR(Class.Suc Chua > 100) order by student.dtb, teacher.id desc");
////		List<List<String>> ret = (List<List<String>>) model.executeQuery(query, "KHTN");						
////		for (int i = 0; i < ret.size(); i++) {
////			List<String> r = ret.get(i);
////			for (int j = 0; j < r.size(); j++) {
////				System.out.print(r.get(j) + "\t");				
////			}
////			System.out.print('\n');
////		}
//		
////		String query = "select * " +
////				"from Student st, Teacher tc " +
//////				"where st.id = tc.Id or tc.id = '0912001' " +
////				"order by st.dtb desc, tc.id desc";
////		List<List<String>> ret = (List<List<String>>) model.executeQuery(query, "KHTN");
////		for (int i = 0; i < ret.size(); i++) {
////			List<String> s = ret.get(i);
////			for (int j = 0; j < s.size(); j++) {
////				System.out.print(s.get(j) + '\t');		
////			}
////			System.out.print('\n');
////		}
//		
////		SelectQuery query = new SelectQuery("SELECT Student.ID, Student.HocSinh, Student.Lop Hoc");
////		List<String> s = query.queryParse();
////		assertEquals(s.size(), 3);
////		for (int i = 0; i < s.size(); i++) {
////			System.out.print(s.get(i));
////		}
////	}
//}
